//
//  NavComView.m
//  CommunitySupermarketProiect
//
//  Created by 吕惠卿 on 2017/10/17.
//  Copyright © 2017年 吕惠卿. All rights reserved.
//

#import "NavComView.h"

@implementation NavComView
-(id)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        [self creatUI];
    }
    return self;
}
-(void)creatUI{
    _zoneBtn = [[UIButton alloc]init];
    [_zoneBtn setTitle:@"区域" forState:UIControlStateNormal];
    [_zoneBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
//    [_zoneBtn addTarget:self action:@selector(rightbtn:) forControlEvents:UIControlEventTouchUpInside];
    [self addSubview:_zoneBtn];
    [_zoneBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(self);
        make.left.equalTo(self.mas_left).with.offset(30);
        make.width.mas_equalTo(40);
        make.height.mas_equalTo(40);
    }];
    
    _nearbyBtn = [[UIButton alloc]init];
    [_nearbyBtn setTitle:@"附近" forState:UIControlStateNormal];
    [_nearbyBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    //    [_zoneBtn addTarget:self action:@selector(rightbtn:) forControlEvents:UIControlEventTouchUpInside];
    [self addSubview:_nearbyBtn];
    [_nearbyBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(self);
        make.left.equalTo(_zoneBtn.mas_right).with.offset(20);
        make.width.mas_equalTo(40);
        make.height.mas_equalTo(40);
    }];
}

@end
